/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.aptech.fpt.c0810g.newspj.dataaccess.share;

import java.sql.Connection;
import java.sql.DriverManager;

/**
 *
 * @author anhgt_b00501
 */
public class GetConnection {

    public Connection GetObj() {
    //   Map<String,String> getInfo = //GetConfigInfo.getConf("connection");
       String host ="scom.vn"; //getInfo.get("host");
       String port ="1433"; //getInfo.get("host");
       String intanceName ="scom.vn"; //getInfo.get("host");
       String database ="tantinhn_AsmTuanAnh"; //getInfo.get("host");
       String user ="tantinhn_anhgt"; //getInsfo.get("host");
       String pass ="22108"; //getInfo.get("host");
        Connection con = null;
        try {
            //Load JDBC Driver
            Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
            //String connection
            String strCon = "jdbc:sqlserver://"+host+";databaseName="+database;
            con = DriverManager.getConnection(strCon, user, pass);
        } catch (Exception e) {
        }
        return con;
    }
}
